home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_d / tpop3.zip / MAILBASE.INT < prev    next >
Text File  |  1996-04-12  |  2KB  |  60 lines

  1. unit mailbase;
  2.  
  3. interface
  4.  
  5. uses
  6.   Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   ExtCtrls, MailUtil, WinSock;
  8.  
  9. type
  10.   EMailError = class(Exception);
  11.   ESocketError = class(Exception);
  12.  
  13.   TMailBase = class(TComponent)
  14.   private
  15.     { Private declarations }
  16.     FServer : string;
  17.     FTimeOut : Integer;
  18.     FLogFileName : string;
  19.     FDefaultPort : word;
  20.   protected
  21.     { Protected declarations }
  22.     MyWSAData : WSAData;
  23.     TheSocket : TSocket;
  24.     ServerInAddr : PIn_Addr;
  25.     ServerIPAddr : string;
  26.     ThePort : word;
  27.     Timer : TTimer;
  28.     CurTick : Integer;
  29.     WsInitCount : Integer;
  30.     Log : TStrings;
  31.     TimedOut : boolean;
  32.     Canceled : boolean;
  33.     ServiceName : string;
  34.     procedure TimerOnTimer(Sender : TObject);
  35.     procedure TimerOn;
  36.     procedure TimerOff;
  37.     procedure ReInit; virtual;
  38.     procedure ResolveRemoteHost;
  39.     procedure GetService;
  40.     procedure OpenSocket;
  41.     procedure Connect;
  42.   public
  43.     { Public declarations }
  44.     constructor Create(AOwner : TComponent); override;
  45.     destructor Destroy; Override;
  46.     procedure WriteLogFile;
  47.     procedure Cancel; virtual;
  48.     procedure Open; virtual; {11.4}
  49.     procedure Close; virtual;
  50.     property LogFileName : string read FLogFileName write FLogFileName;
  51.     property DefaultPort : word read FDefaultPort write FDefaultPort;
  52.   published
  53.     { Published declarations }
  54.     property Server : string read FServer write FServer;
  55.     property TimeOut : Integer read FTimeOut write FTimeOut default 60;
  56.   end;
  57.  
  58. implementation
  59.  
  60.